* {
  box-sizing: border-box;
}

body {
  padding: 10px;
  background: #f2f2f2;
  hyphens: auto;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
}

body#md {
    max-width: 100%;
}

/* División de sílabas para elementos de texto */
p, li, div, blockquote, td, th, .panel {
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    -webkit-hyphenate-limit-before: 3;
    -webkit-hyphenate-limit-after: 2;
    -webkit-hyphenate-limit-lines: 2;
    hyphenate-limit-chars: 6 3 2;
}

.tab-index {
  display: flex;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 48px 80px -32px rgba(0, 0, 0, 0.3);
}

.input {
  position: absolute;
  opacity: 0;
}

.label {
  width: 100%;
  padding: 20px 30px;
  background: #e5e5e5;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
  color: #7f7f7f;
  transition: background .2s, color .2s;
}

.label:hover {
  background: #d8d8d8;
}

.label:active {
  background: #ccc;
}

.input:focus + .label {
  box-shadow: inset 0px 0px 0px 3px #6aa84f;
  z-index: 1;
}

.input:checked + .label {
  background: #fff;
  color: #000;
}

@media (min-width: 800px) {
  .label {
    width: auto;
  }
}

.panel {
  display: none;
  padding: 20px 30px 30px;
  background: #fff;
}

@media (min-width: 800px) {
  .panel {
    order: 99;
  }
}

.input:checked + .label + .panel {
  display: block;
}

.markdeepFooter {
    font-size: 9px;
    text-align: right;
    padding-top: 8px;
    color: #999;
}

#tab-6:checked + .label + .panel .graph-container {
    position: relative;
    height: 350px;
    min-height: 350px;
    width: 100%;
    border: 0px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

#tab-6:checked + .label + .panel .node {
    position: absolute;
    width: 150px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 1px solid #727272;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(39, 39, 39);
    font-weight: bold;
    font-size: 12px;
    text-align: center;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 10;
}

#tab-6:checked + .label + .panel .node:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    border: 2px solid #252525;
}

#tab-6:checked + .label + .panel .node.trans {
    background: #f5576c;
}

#tab-6:checked + .label + .panel .node.lp {
    background: #4facfe;
}

#tab-6:checked + .label + .panel .node.lpo {
    background: #43e97b;
}

#tab-6:checked + .label + .panel .node.active {
    background: #ffecd2;
    color: #333;
    border: 2px solid #252525;
}

#tab-6:checked + .label + .panel .edge-line {
    background: #444;
    position: absolute;
    height: 1.5px;
    transform-origin: left center;
}

#tab-6:checked + .label + .panel .arrow {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 12px solid #444;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    z-index: 2;
}

#tab-6:checked + .label + .panel .arrow.highlight {
    border-left-color: #ff6b6b;
}

#tab-6:checked + .label + .panel .edge-line.highlight {
    background: #ff6b6b;
}

#tab-6:checked + .label + .panel .info-panel {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 2px;
    border-left: 10px solid #616161;
}

#tab-6:checked + .label + .panel .info-panel h3 {
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.2;
}

#tab-6:checked + .label + .panel .info-panel p {
    font-size: 16px;
    line-height: 1.4;
    margin: 5px 0;
    color: #444;
}

#tab-6:checked + .label + .panel .info-panel li {
    font-size: 16px;
    line-height: 1.4;
    margin: 5px 0;
    color: #444;
}

/* Estilos para el modal pop-up */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px 10px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: bold;
}

.modal-header h2 a {
    color: #4facfe;
    text-decoration: none;
    transition: color 0.2s;
}

.modal-header h2 a:hover {
    color: #1e88e5;
    text-decoration: underline;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    user-select: none;
}

.close:hover,
.close:focus {
    color: #333;
}

.modal-body {
    padding: 20px 25px 25px 25px;
}

.modal-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-body li {
    margin: 15px 0;
    line-height: 1.5;
}

.modal-body li strong {
    color: #333;
    font-weight: 600;
}

.modal-body li:first-child {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal.show {
    display: block;
}